<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
  <link rel="stylesheet" href="assets/css/ace.min.css" />
  <link rel="stylesheet" href="css/style.css"/>
 <script type="text/javascript" src="js/vue.min.js"></script>
 <script type="text/javascript" src="js/axios.js"></script>
 <!-- 引入样式 -->
 <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
 <!-- 引入组件库 -->
 <script src="https://unpkg.com/element-ui/lib/index.js"></script>
<title>生成订单</title>
</head>

<body>
<div id="app">
<div class="page-content">
 <div class="Inquiry_info Order_Details_style">
   <div class="Numbering">项目编号<b>NGRT3242342342323</b></div> 
  <div>
   <ul class="clearfix"> 
    <li><label class="label_name">项目名称</label><span>{{haperObj.project_name}}</span></li>
    <li><label class="label_name">加油地点</label><span>{{haperObj.place}}</span></li>
    <li><label class="label_name">预计加油时间</label><span>{{haperObj.prime_date}}</span></li>
    <li><label class="label_name">船名</label><span>{{haperObj.boat_name}}</span></li>
   </ul>
  </div>
  <div class="Item_Details">
  <table id="" class="table table-striped table-bordered table-hover">
      <thead>
       <tr>
        <th>产品名称</th>
        <th>采购数量</th>
        <th>单位</th>
        <th width="160">投标当天标杆价（元/吨）</th>
        <th width="160">报价当天标杆价（元/吨）</th>
        <th class="label_name"><P class="name">A供应商</P><P class="price"><span class="right_border">入围价</span><span>最高限价</span></P></th>
        <th class="label_name"><P class="name">B供应商</P><p class="price"><span class="right_border">入围价</span><span>最高限价</span></p></th>
        <th class="label_name"><P class="name">C供应商</P><p class="price"><span class="right_border">入围价</span><span>最高限价</span></p></th>       
       </tr>
      </thead>
     <tbody>
      <tr>
       <td>#0号柴油</td>
       <td>11</td>
       <td>吨</td>
       <td>178178</td>
       <td>190190</td>
       <td class="price">
       <span class="tb_price right_border">231</span>
       <span class="tb_price">267</span>
       </td>
       <td class="fg">
       <span class="tb_price right_border">156</span>
       <span class="tb_price">189</span>
       </td>
       <td class="fg">
       <span class="tb_price right_border">178</span>
       <span class="tb_price">215</span>
       </td>
      </tr>
       <tr>
       <td>#18号柴油</td>
       <td>11</td>
       <td>吨</td>
        <td>178178</td>
       <td>190190</td>
       <td class="price">
         <span class="tb_price right_border">231</span>
         <span class="tb_price">267</span>
       </td>
       <td class="fg">
       <span class="tb_price right_border">156</span>
       <span class="tb_price">189</span>
       </td>
       <td class="fg">
       <span class="tb_price right_border">178</span>
       <span class="tb_price">215</span>
       </td>
      </tr>
     </tbody>
     </table>
  </div>
  <div class="Manager_style">
   <span class="title_name">供应商报价排名</span>
   <div class="Rankings_style">
    <table class="table table-striped table-bordered table-hover">
     <thead>
      <tr><th width="50px">排名</th>
      <th width="">供应商名称</th>
      <th width="">产品名称</th>
      <th width="">采购数量</th>
      <th width="">供应商报价（元/吨）</th>
      <th width="">小计（元）</th>
      <th width="">合计（元）</th>
      <th width="">备注</th>
      <th width="">合同附件</th>
      <th width="">操作</th>
      </tr>
     </thead>
     <tbody>
      <tr>
      <td>1</td>
      <td style="border-right:0px"><a href="javascript:ovid(0)" class="gys_xinxi">供应商A</td>
      <td colspan="4" class="table_jiage">
       <table width="100%" cellpadding="0" cellspacing="0" >
        <tr style=" border-bottom:1px solid #ddd">
        <td width="">0#柴油</td><td width="">123</td><td width="">155</td><td width="">456</td>
        </tr>
        <tr>
        <td width="">18#航空燃油</td><td width="">123</td><td width="">145</td><td width="">567</td>
        </tr>
       </table>
      <td >897</td>
      <td ><textarea name="" cols="" rows="" style=" height:50px; margin:5px;"></textarea></td>
      <td ><button type="button" class="btn btn-info">浏览</button></td>
      <td ><a type="button" class="btn btn-warning b_submit_btn" href="javascript:ovid(0)">选择</a></td>
      </tr>
        <tr>
      <td>2</td>
      <td style="border-right:0px"><a href="javascript:ovid(0)" class="gys_xinxi">供应商A</td>
      <td colspan="4" class="table_jiage">
       <table width="100%" cellpadding="0" cellspacing="0" >
        <tr style=" border-bottom:1px solid #ddd">
        <td width="">0#柴油</td><td width="">123</td><td width="">155</td><td width="">456</td>
        </tr>
        <tr>
        <td width="">18#航空燃油</td><td width="">123</td><td width="">145</td><td width="">567</td>
        </tr>
       </table>
      <td >897</td>
      <td ><textarea name="" cols="" rows="" style=" height:50px; margin:5px;"></textarea></td>
      <td ><button type="button" class="btn btn-info">浏览</button></td>
      <td ><a type="button" class="btn btn-warning b_submit_btn" href="javascript:ovid(0)">选择</a></td>
      </tr>
        <tr>
      <td>1</td>
      <td style="border-right:0px"><a href="javascript:ovid(0)" class="gys_xinxi">供应商A</td>
      <td colspan="4" class="table_jiage">
       <table width="100%" cellpadding="0" cellspacing="0" >
        <tr style=" border-bottom:1px solid #ddd">
        <td width="">0#柴油</td><td width="">123</td><td width="">155</td><td width="">456</td>
        </tr>
        <tr>
        <td width="">18#航空燃油</td><td width="">123</td><td width="">145</td><td width="">567</td>
        </tr>
       </table>
      <td >897</td>
      <td ><textarea name="" cols="" rows="" style="height:50px; margin:5px;"></textarea></td>
      <td ><button type="button" class="btn btn-info">浏览</button></td>
      <td ><a type="button" class="btn btn-warning b_submit_btn" href="javascript:ovid(0)">选择</a></td>
      </tr>
     </tbody>
    </table>
   </div>
  </div>
  <div class="Tips_content">
  <h3>询价说明：</h3>
  <p>及时处理</p>
  </div>
  <div class="center"><a  class=" btn btn-primary" href="javascript :;" onClick="javascript :history.back(-1);">返回</a></div>
 </div>
</div>
</div>
<!--[if !IE]> -->
		<script src="assets/js/jquery.min.js"></script>
		<!-- <![endif]-->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->
<script src="assets/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript">
 //弹出一个iframe层
$('.Order_form').on('click', function(){
    layer.open({
        type: 2,
        title: '生成订单详细',
        maxmin: true,
        shadeClose: true, //点击遮罩关闭层
        area : ['900px' , '550px'],
        content: '询价订单详细.html'
    });
});

 //弹出一个iframe层
$('.gys_xinxi').on('click', function(){
    layer.open({
        type: 2,
        title: '供应商信息',
        maxmin: true,
        shadeClose: true, //点击遮罩关闭层
        area : ['580px' , '400px'],
        content: '供应商信息.html'
    });
});
$('.b_submit_btn').on('click', function(){
    layer.open({
        type: 2,
        title: '提交询价订单信息',
        maxmin: true,
        shadeClose: true, //点击遮罩关闭层
        area : ['800px' , '400px'],
        content: '提交询价订单信息.html'
    });
});
</script>

<script>
    new Vue({
     el:"#app",
     data:{
       //项目id
      o_id:0,
      //模板id
      m_id:0,
      //模板数据
      modulesData:[],
      //除模板数据
      dMData:[],
      //头数据
      haperObj:{}
     },
     methods:{
      getInfo(){
       let mn =parseInt(this.m_id)
       axios.get("modules/findModule.do?m_id="+mn).then(dt =>{
        this.modulesData = [];
        for (let i = 0; i < dt.data.length; i++) {
         let fn=JSON.stringify(dt.data[i].breed)
         let comData = {
          ms_id:dt.data[i].ms_id.split(","),
          supplier:dt.data[i].supplier,
          breed:fn.split(","),
          finalist: dt.data[i].finalist.split(","),
          now_fix:dt.data[i].now_fix.split(",")
         };
         this.modulesData.push(comData)

        }
        this.supsData=[]
       })
       axios.get("modules/supSer.do?o_id="+this.o_id).then(dt =>{
        for (let i = 0; i < dt.data.length; i++) {
            let supObj = {
             ms_id: dt.data[i].ms_id.split(","),
             purchase:dt.data[i].purchase,
             quote_max:dt.data[i].quote_max,
             sup_max:dt.data[i].sup_max.split(",")
            }
            this.dMData.push(supObj)
        }
       })
      axios.get("orders/idSer.do?o_id="+this.o_id).then(dt =>{
          this.haperObj=dt.data
      })
      },
     },
     mounted(){
      const urlParams=new URLSearchParams(window.location.search);
      this.o_id=urlParams.get("o_id")
      this.m_id=urlParams.get("m_id")
      this.getInfo()

     },

    })
</script>
</body>
</html>
